<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>05 封装函数生成随机数</title>
</head>
<body>
    
</body>
<script>

    /* 
        05 封装函数生成随机数

    */

    // 声明式
    function ranNum() {
        var num = parseInt(Math.random() * 100 ) + 1;
        // return num;
        console.log(num);
    }

    ranNum();

</script>
</html>